package com.ws.array;
/*
⑤：数组元素的默认初始化值
    数组元素是整型：0
    数组元素是浮点型：0.0
    数组元素是 char 型：0 或 '\u0000'，而非 '0'
    数组元素是 boolean 型：false

    数组元素是引用数据类型：null

⑥：数组的内存解析
 */
public class ArrayTest2 {
    public static void main(String[] args) {
        //5.数组元素的默认初始化值
        int[] nums = new int[4];
        for (int ar: nums) {
            System.out.println(ar);
        }

        short[] nums1 = new short[4];
        for (short ar: nums1) {
            System.out.println(ar);
        }

        long[] nums2 = new long[4];
        for (long ar: nums2) {
            System.out.println(ar);
        }

        double[] nums3 = new double[4];
        for (double ar: nums3) {
            System.out.println(ar);
        }

        char[] chars = new char[4];
        for (char c: chars) {
            System.out.println(c);
        }

        boolean[] b = new boolean[3];
        System.out.println(b[0]);

        String[] strings = new String[3];
        System.out.println(strings[0]);

    }

}
